package com.qxkj.demo.dao;

import com.qxkj.demo.pojo.CeShi;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface CeShiDao {
    @Select("select * from ceshi")
    public List<CeShi> getAll();
    @Delete("DELETE FROM ceshi WHERE id=#{id}")
    int delete(int id);
    @Update("update ceshi set price=#{price} where id=#{id}")
    int update(CeShi ceShi);
    @Select("select * from ceshi where id=#{id}")
    CeShi find(Long id);
}
